public class Client {
    public static void main(String[] args) {
        Subject subject = new ConcreteSubject();
        Observer observer1 = new ConcreteObserver("observer1");
        Observer observer2 = new ConcreteObserver("observer2");
        subject.attach(observer1);
        subject.attach(observer2);
        subject.notifyObservers();
        subject.detach(observer1);
        subject.notifyObservers();
    }
}
